<%@ page import="model.entity.product.Product.*"%>
<%@ page import="dao.AbstractDAO"%>
<%@ page import="dao.entity.ProductDAO"%>
<%@ page import="dao.JPAHiberDAOFactory"%>
<%@ page import="java.util.List"%>
<%@ page import=" model.entity.product.Product"%>

<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<%@include file="headerLink.jsp"%>
<title>Dang nhap dang ky</title>

<script type="text/javascript">
$(function() {
	var $container = $('#productContainer');
	$container.imagesLoaded(function(){
	  $container.masonry({
	    itemSelector : '.products-box'
	  });
	});
});
</script>
</head>
<body>

<%
		String email_err = "";
		if(request.getAttribute("email_err") != null){
//		ép kiểu
			email_err = (String) request.getAttribute("email_err");
		}
//		giu lai thong tin nguoi dung
		String email = "";
		if(request.getAttribute("email") != null){
//		ép kiểu
			email = (String) request.getAttribute("email");
		}
		
		String password_err ="";
		if(request.getAttribute("password_err") != null){
			password_err = (String) request.getAttribute("password_err");
		}
		
		String password = "";
		if(request.getAttribute("password") != null){
			password = (String) request.getAttribute("password");
		}
		
		String re_password = "";
		if(request.getAttribute("re_password") != null){
			re_password =(String) request.getAttribute("re_password");
		}
		
		
		
		String phone_err = "";
		if(request.getAttribute("phone_err") != null){
			phone_err = (String) request.getAttribute("phone_err");
		}
		
		String phone = "";
		if(request.getAttribute("phone") != null){
			phone = (String) request.getAttribute("phone");
		}
		

		String homeadd_err = "";
		if(request.getAttribute("homeadd_err") != null){
			homeadd_err = (String) request.getAttribute("homeadd_err");
		}
		
		String homeadd = "";
		if(request.getAttribute("homeadd") != null){
			homeadd = (String) request.getAttribute("homeadd");
		}
		
		
	%>

	<div id="nen">
		
		<jsp:include page="menuLeft.jsp"></jsp:include>		
			
		<div id="khungGiua">
			<jsp:include page="header.jsp"></jsp:include>
			
			<div style="clear: left;"></div>
			
			<div id="noiDung">

				<div id="khungDangNhapDangKy">
					<div id="tenDNDK">đăng nhập hoắc đăng ký thành viên mới</div>
					<div id="dangNhapDangKy">
						<div class="dangNhap">
							<ul>
								<li>bạn là thành viên của fashion shop</li>
								<form action="../UserLogin" method="post">
									<table class="canLeTable">
										<tr>
											<td>tên đăng nhập</td>  <td><input type="text" name="username" placeholder="Username" required="required" style="width: 150px;"></td>
										</tr>
										<tr>
											<td>mật khẩu </td> <td><input type="password" name="password" required="required" style="width: 150px;" ></td>
										</tr>
										<tr>
											<td><button type="submit" title="dang nhap">ĐĂNG NHẬP</button></td>
										</tr>								
									</table>
								</form>
							</ul>
						</div>
						<div class="dangKy">
							<ul>
								<li>đăng ký tài khoản mới</li>
								<form action="../XuLyDangKy" method="post">
									<table class="canLeTable">
										<tr>
											<td>email</td>  <td><input type="text" style="width: 150px;" name="email" value="<%=email%>" ></td>
											<td><font style="color: red;"> * <%=email_err%></font></td>
										</tr>
										<tr>
											<td>mật khẩu </td> <td><input type="password" style="width: 150px;" name="password" value="<%=password%>"></td>
											<td><font style="color: red;">*<%=password_err%></font></td>
										</tr>
										<tr>
											<td>nhập lại mật khẩu </td> <td><input type="password" style="width: 150px;" name="re_password" value="<%=re_password%>"></td>
											<td><font style="color: red;">*<%=password_err%></font></td>
										</tr>
										<tr>
											<td>số điện thoại </td> <td><input type="text" style="width: 150px;" name="phone" value="<%=phone%>"></td>
											<td><font style="color: red;">*<%=phone_err%></font></td>
										</tr>
										<tr>
											<td>địa chỉ </td> <td><textarea rows="5" cols="16" name="homeadd"></textarea></td>
											<td><font style="color: red;">*<%=homeadd_err%></font></td>
										</tr>
										<tr>
											<td><input type="submit" value="ĐĂNG KÝ"/><input type="reset" value="XÓA FROM"/></td>
										</tr>								
									</table>
								</form>
							</ul>
						</div>
					</div>
				</div>

			</div>
			<!-- dong the noi dung -->

		</div>
		
			<!-- menu nu -->
			
				<jsp:include page="menuRight.jsp"></jsp:include>
			

	</div>

</body>
</html>